﻿using System.Collections.Generic;
using Shuba.Model;

namespace Shuba.Business
{
    public class BranchTarget
    {
        private Data.BranchTarget BranchTargetData;

        public BranchTarget()
        {
            BranchTargetData = new Data.BranchTarget();
        }

        public List<BranchTargetInfo> GetList(string BranchID, string TargetYear)
        {
            return BranchTargetData.GetList(BranchID, TargetYear);
        }

        public List<BranchTargetInfo> GetListByCluster(string ClusterID, string TargetYear)
        {
            return BranchTargetData.GetListByCluster(ClusterID, TargetYear);
        }

        public List<BranchTargetInfo> GetListApproval(string TargetYear, string UpdateBy, string CostCenter)
        {
            return BranchTargetData.GetListApproval(TargetYear, UpdateBy.TrimEnd(), CostCenter);
        }

        public List<BranchTargetInfo> GetListApprovalByMonth(string TargetYear, string TargetMonth, string UpdateBy)
        {
            return BranchTargetData.GetListApprovalByMonth(TargetYear, TargetMonth, UpdateBy.TrimEnd());
        }

        public BranchTargetInfo Get(string id, string TargetYear)
        {
            return BranchTargetData.Get(id, TargetYear);
        }

        public BranchTargetInfo Get(string id, string TargetYear, string TargetMonth)
        {
            return BranchTargetData.Get(id, TargetYear, TargetMonth);
        }

        public void Save(BranchTargetInfo BranchTargetInf)
        {
            BranchTargetData.Save(BranchTargetInf);
        }

        public void Approve(string BranchID, string TargetYear, string TargetMonth, string ActType)
        {
            BranchTargetData.Approve(BranchID, TargetYear, TargetMonth, ActType);
        }

        public void Reject(string BranchID, string TargetYear, string TargetMonth)
        {
            BranchTargetData.Reject(BranchID, TargetYear, TargetMonth);
        }

        public BranchTargetInfo GetApprovalByID(string BranchID, string TargetYear)
        {
            return BranchTargetData.GetApprovalByID(BranchID, TargetYear);
        }

        public BranchTargetInfo GetApprovalByID(string BranchID, string TargetYear, string TargetMonth)
        {
            return BranchTargetData.GetApprovalByID(BranchID, TargetYear, TargetMonth);
        }

    }
}
